var express = require("express");
var router = express.Router();

const detailsModel = require("../models/details_module");

// 房源详情页面数据
router.post("/list", function (req, res, next) {
  const { id } = req.body;

  detailsModel.findOne({ house_id: id }, (err, doc) => {
    if (err) throw err;
    res.json({
      status: 0,
      data: doc,
    });
  });
});

module.exports = router;
